<!DOCTYPE html>
<!--<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">-->
<html xmlns:th="http://www.thymeleaf.org" xmlns:data="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <!--<meta content="text/html;charset=UTF-8"/>-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Title</title>
</head>
<head th:include="include/include" ></head>
<script>
    //禁止滚动条
    $(document.body).css({
        "overflow-x":"hidden",
        "overflow-y":"auto"
    });
    $(function (){

        //费用小计
        $("#calculateSunFee1").blur(function(){
            var sum=eachTable("#feeInfoTable",1);
            $(this).val(sum);
        });
        $("#calculateSunFee2").blur(function(){
            var sum=eachTable("#feeInfoTable",2);
            $(this).val(sum);
        });

    });
    function getParentData2(taskNo,taskId){
        if(taskNo!=''&&typeof  taskNo!="undefined"){
            $("#taskNo").val(taskNo);
            findHumanInjueyInfoByTaskNo(taskNo);
            FeetInfo(taskNo);
            findDependantsInfo(taskNo);
            caregiversInfo(taskNo);
        }

    }
    //查询基本信息
    function findHumanInjueyInfoByTaskNo(taskNo){
        $.get("humanInjuryInfo/findByTaskNo",{taskNo:taskNo},function(data){
            if(data!=null){
                if(data.status==1){
                    var datas=data.data;
                    if(datas!=null){
                        var xm=datas.xm;//姓名
                        $("#xm").val(xm);
                        var xb=datas.xb;//性别
                        $("#xb option[value="+xb+"]").prop("selected",true);
                        var nl=datas.nl;//年龄
                        $("#nl").val(nl);
                        var hj=datas.hj;//户籍
                        $("#hj option[value="+hj+"]").prop("selected",true);
                        var jtzt=datas.jtzt;//交通状态
                        $("#jtzt option[value="+jtzt+"]").prop("selected",true);
                        var zlfs=datas.zlfs;//诊疗方式
                        $("#zlfs option[value="+zlfs+"]").prop("selected",true);

                        var jzyy=datas.jzyy;//就诊医院
                        $("#jzyy").val(jzyy);

                        var rysj=datas.rysj;//入院时间
                        $("#rysj").val(rysj);

                        var kscw=datas.kscw;//科室床位
                        $("#kscw").val(kscw);
                        var zjhm=datas.zjhm;//证件号码
                        $("#zjhm").val(zjhm);
                        var lxdh=datas.lxdh;//证件号码
                        $("#lxdh").val(lxdh);

                        var zylx=datas.zylx;//诊疗方式
                        $("#zylx option[value="+zylx+"]").prop("selected",true);

                        var jtdz=datas.jtdz;//家庭地址
                        $("#jtdz").val(jtdz);
                        var gzsrqk=datas.gzsrqk;//工资收入情况
                        $("#gzsrqk").val(gzsrqk);
                        var szgzdw=datas.szgzdw;//伤者工作单位
                        $("#szgzdw").val(szgzdw);
                        var gwzw=datas.gwzw;//岗位职务
                        $("#gwzw").val(gwzw);
                        var dwdz=datas.dwdz;//单位地址
                        $("#dwdz").val(dwdz);
                        var dwdh=datas.dwdh;//单位电话
                        $("#dwdh").val(dwdh);
                        var zgscxs=datas.zgscxs;//最高伤残系数
                        $("#zgscxs option[value="+zgscxs+"]").prop("selected",true);

                        var scfjxt=datas.scfjxt;//伤残附加系数
                        $("#scfjxt option[value="+scfjxt+"]").prop("selected",true);
                        var sccd=datas.sccd;//伤残程度
                        $("#sccd option[value="+sccd+"]").prop("selected",true);
                        var scjdjgmc=datas.scjdjgmc;//伤残鉴定机构名称
                        $("#scjdjgmc").val(scjdjgmc);
                        var scjdjgzzjgdm=datas.scjdjgzzjgdm;//伤残鉴定机构组织机构代码
                        $("#scjdjgzzjgdm").val(scjdjgzzjgdm);
                        var sfxydb=datas.sfxydb;//是否需要担保
                        if(sfxydb=="是"){
                            sfxydb=1;
                        }else if(sfxydb=="否"){
                            sfxydb=0;
                        }
                        $("input[name='sfxydb']").each(function () {
                            if ($(this).val() == sfxydb) {
                                $(this).attr("checked", true);
                            }
                        });

                        var sfydb=datas.sfydb;//是否已担保
                        if(sfydb=="是"){
                            sfydb=1;
                        }else if(sfydb=="否"){
                            sfydb=0;
                        }
                        $("input[name='sfydb']").each(function () {
                            if ($(this).val() == sfydb) {
                                $(this).attr("checked", true);
                            }
                        });

                        var scjb=datas.scjb;//伤残级别
                        $("#scjb option[value="+scjb+"]").prop("selected",true);
                        var sfwcrsdc=datas.sfwcrsdc;//是否完成人伤调查
                        if(sfwcrsdc=="是"){
                            sfwcrsdc=1;
                        }else if(sfydb=="否"){
                            sfwcrsdc=0;
                        }
                        $("input[name='sfwcrsdc']").each(function () {
                            if ($(this).val() == sfwcrsdc) {
                                $(this).attr("checked", true);
                            }
                        });
                        var sfwczydc=datas.sfwczydc;//是否完成住院调查
                        if(sfwczydc=="是"){
                            sfwczydc=1;
                        }else if(sfwczydc=="否"){
                            sfwczydc=0;
                        }
                        $("input[name='sfwczydc']").each(function () {
                            if ($(this).val() == sfwczydc) {
                                $(this).attr("checked", true);
                            }
                        });

                        var ckry=datas.ckry;//查勘人员
                        $("#ckry").val(ckry);
                        var dsxzmc=datas.dsxzmc;//定损险种名称
                        $("#dsxzmc option[value="+dsxzmc+"]").prop("selected",true);
                        var ylfze=datas.ylfze;//医疗费总额
                        $("#ylfze").val(ylfze);
                        var scfze=datas.scfze;//伤残费总额
                        $("#scfze").val(scfze);
                        var zyzd=datas.zyzd;//主要诊断
                        $("#zyzd").val(zyzd);
                        var cksm=datas.cksm;//勘察说明
                        $("#cksm").val(cksm);
                    }
                }else{
                    BootstrapDialog.show({
                        title: '提示信息',
                        message: data.msg,
                        type: BootstrapDialog.TYPE_WARNING,
                        size: BootstrapDialog.SIZE_SMALL,
                        buttons: [{
                            label: '确认',
                            action: function (dialog) {
                                dialog.close();
                            }
                        }]
                    });
                }


            }


        })


    }
    function saveOrUpdate(val){
        var form=$("form").serialize();
        $.post("humanInjuryInfo/saveOrUpdate",form,function(data){
            if(data!=null){
                if(data.status==1){

                }else{

                }
                BootstrapDialog.show({
                    title: '提示信息',
                    message: data.msg,
                    type: BootstrapDialog.TYPE_WARNING,
                    size: BootstrapDialog.SIZE_SMALL,
                    buttons: [{
                        label: '确认',
                        action: function (dialog) {
                            dialog.close();
                        }
                    }]
                });

            }

        })

    }

    //查询费用信息
    function FeetInfo(taskNo){
        if(taskNo!=''){
            $.post("manHour/list",{limit: 50, // 每页要显示的数据条数
                offset: 0, // 每页显示数据的开始行号
                page: 1,
                renwuno:taskNo,},function(data){
                if(data!=null){
                    $.each(data.rows,function(index,item){
                        feeAddTr(item.fylx,item.fyje,item.hsje,item.sm,item.ids);
                        $("#tr_addCost").prev().children().children().children().find("option[value='"+item.fylx+"']").prop("selected",true);
                    })

                }


            })
        }
    }
    //查询被抚养人信息
    function findDependantsInfo(taskNo){
        $.post("dependantsInfo/list",
                {limit: 50, // 每页要显示的数据条数
                offset: 0, // 每页显示数据的开始行号
                page: 1,
                renuwno:taskNo},
                function(data){
                    if(data!=null){
                        $.each(data.rows,function(index,item){
                            dependantsAddTr(item.xm,item.nl,item.xb,item.yszgx,item.ids);
                            $("#tr_addDependents").prev().children().eq(2).children().children().find("option[value='"+item.xb+"']").prop("selected",true);
                        })

                    }
        })

    }
    function caregiversInfo(taskNo){
        $.post("caregiversInfo/list",
            {limit: 50, // 每页要显示的数据条数
                offset: 0, // 每页显示数据的开始行号
                page: 1,
                renuwno:taskNo},
            function(data){
                if(data!=null){
                    $.each(data.rows,function(index,item){
                        addCaregiverTr(item.xm,item.nl,item.xb,item.gzqk,item.yszgx,item.gongziqk,item.ids)
                        $("#tr_addCaregiver").prev().children().eq(2).children().children().find("option[value='"+item.xb+"']").prop("selected",true);
                    })

                }
            })


    }

    <!--删除行-->
   /* function deletetr(tr){
        $(tr).parent().parent().remove();
    }*/
    function feeAddTr(fylx,fyje,hsje,sm,ids){
        if(fylx==null || isNaN(fylx)){
            fylx=0;
        }
        if(fyje==null){
            fyje='';
        }
        if(hsje==null){
            hsje='';
        }
        if(sm==null){
            sm='';
        }
        if(ids==null||ids==0){
            ids='';
        }
        var str="<tr>" +
            "       <td>" +
            "           <label>" +
            "               <select name='FeeType' value='' onchange=\"update(this,'"+ids+"','fylx','manHour/saveOrUpdate')\">" +
            "                   <option value='0'>-请选择-</option>" +
            "                   <option value='1'>医疗费</option>" +
            "                   <option value='2'>住院伙食补助费</option>" +
            "                   <option value='3'>续医费</option>" +
            "                   <option value='4'>整容费</option>" +
            "                   <option value='5'>营养费</option>" +
            "                   <option value='6'>误工费</option>" +
            "                   <option value='7'>护理费</option>" +
            "                   <option value='8'>交通费</option>" +
            "                   <option value='9'>康复费</option>" +
            "                   <option value='10'>住宿费</option>" +
            "                   <option value='11'>事故处理人费用</option>" +
            "                   <option value='12'>精神补偿费</option>" +
            "               </select>" +
            "           </label>" +
            "       </td>" +
            "       <td>" +
            "           <label>" +
            "               <input value='"+fyje+"' onblur=\"update(this,'"+ids+"','fyje','manHour/saveOrUpdate');\" onkeyup= \"if(! /^[0-9]{1,}(?:.[0-9]{0,2})?$/.test(this.value)){alert('只能输入数字,小数点后只能保留两位');this.value=this.defaultValue;}\"/>" +
            "          </label>" +
            "       </td>  " +
            "       <td>  " +
            "           <label>" +
            "               <input value='"+hsje+"' onblur=\"update(this,'"+ids+"','hsje','manHour/saveOrUpdate');\" onkeyup= \"if(! /^[0-9]{1,}(?:.[0-9]{0,2})?$/.test(this.value)){alert('只能输入数字,小数点后只能保留两位');this.value=this.defaultValue;}\"/>" +
            "          </label>  " +
            "       </td>  " +
            "       <td>\n" +
            "           <label>" +
            "               <input name='' value='"+sm+"' class='' onblur=\"update(this,'"+ids+"','sm','manHour/saveOrUpdate');\" />" +
            "           </label>" +
            "       </td>\n" +
            "       <td>\n" +
            "               <span class=\"glyphicon glyphicon-remove-sign\" onclick=\"deletetr(this,'"+ids+"','manHour/delById','GET');\"></span>" +
            "               <span style='display: none;'>"+ids+"</span>" +
            "       </td>" +
            "   </tr>";
        $("#tr_addCost").before(str);
    }

    //删除当前行
    function deletetr(tr,ids,url,type){
        if(ids!=''&&ids!=null&& typeof ids!="undefined"){
            BootstrapDialog.show({
                title: '确认删除',
                message: '是否删除？',
                type:BootstrapDialog.TYPE_WARNING,
                size:BootstrapDialog.SIZE_SMALL,
                buttons: [{
                    label: '确认',
                    action: function(dialog) {
                        $.ajax({
                            url:url,
                            data:{id:ids},
                            dataType:"JSON",
                            type:type,
                            async:false,
                            success:function(data){
                                if(data!=null){
                                    if(data.status==1){
                                        dialog.close();
                                        $(tr).parent().parent().remove();
                                    }
                                }
                            },
                            error:function(){
                                alert("sssss");

                            }
                        })


                    }
                }, {
                    label: '取消',
                    action: function(dialog) {
                        dialog.close();
                    }
                }]
            });

        }else{
            $(tr).parent().parent().remove();
        }

    }

    //更新信息
    function  update(val,ids,name,url){
        if(name!=''&&url!=''){
            var taskNo=$("#taskNo").val();
            var tdValue=$(val).val();
            console.log("旧值:"+val.defaultValue+"新值："+tdValue);
            if(tdValue==''||val.defaultValue==tdValue){//为空或者未改变值
                return;
            }
            var map={};
            map[name]=tdValue;
            map['renwuno']=taskNo;
            if(ids!=''){
                map['ids']=ids;
            }else{
                ids=$(val).parent().parent().parent().children().eq(4).children().eq(1).text();
                map['ids']=ids;
            }
            $.ajax({
                url:url,
                data:map,
               /* dataType:"json",*/
                type:"POST",
                async:false,
                success:function(data){
                    if(data!=null){
                        if(data.status==1){
                            val.defaultValue=map[name];
                            if(ids==''){
                                //var s=$(val).parent().parent().parent().children().eq(4).children().eq(1).text(data.data.ids);
                                var operationTd=$(val).parent().parent().parent().children().eq(4);
                                    operationTd.empty();
                                var td=" <span class='glyphicon glyphicon-remove-sign' onclick=\"deletetr(this,'"+data.data.ids+"','manHour/delById','GET');\"></span>" +
                                    "<span style='display: none;'>"+data.data.ids+"</span>";
                                operationTd.append(td);
                            }
                        }else{
                            BootstrapDialog.show({
                                title: '提示信息',
                                message: data.msg,
                                type: BootstrapDialog.TYPE_WARNING,
                                size: BootstrapDialog.SIZE_SMALL,
                                buttons: [{
                                    label: '确认',
                                    action: function (dialog) {
                                        dialog.close();
                                    }
                                }]
                            });
                        }
                    }



                },
                error:function () {
                    alert("cuowu");

                }

            })

        }

    }

    //更新被扶养人
    function  updateDependants(val,ids,url,name){
        if(name!=''&&url!=''){
            var taskNo=$("#taskNo").val();
            var tdValue=$(val).val();
            console.log("旧值:"+val.defaultValue+"新值："+tdValue);
            if(tdValue==''||val.defaultValue==tdValue){//为空或者未改变值
                return;
            }
            var map={};
            map[name]=tdValue;
            map['renuwno']=taskNo;
            if(ids!=''){
                map['ids']=ids;
            }else{
                ids=$(val).parent().parent().parent().children().eq(4).children().eq(1).text();
                map['ids']=ids;
            }
            $.ajax({
                url:url,
                data:map,
                /* dataType:"json",*/
                type:"POST",
                async:false,
                success:function(data){
                    if(data!=null){
                        if(data.status==1){
                            val.defaultValue=map[name];
                            if(ids==''){
                                //var s=$(val).parent().parent().parent().children().eq(4).children().eq(1).text(data.data.ids);
                                var operationTd=$(val).parent().parent().parent().children().eq(4);
                                operationTd.empty();
                                var td=" <span class='glyphicon glyphicon-remove-sign' onclick=\"deletetr(this,'"+data.data.ids+"','dependantsInfo/delById','GET');\"></span>" +
                                    "<span style='display: none;'>"+data.data.ids+"</span>";
                                operationTd.append(td);
                            }
                        }else{
                            BootstrapDialog.show({
                                title: '提示信息',
                                message: data.msg,
                                type: BootstrapDialog.TYPE_WARNING,
                                size: BootstrapDialog.SIZE_SMALL,
                                buttons: [{
                                    label: '确认',
                                    action: function (dialog) {
                                        dialog.close();
                                    }
                                }]
                            });
                        }
                    }



                },
                error:function () {
                    alert("cuowu");

                }

            })

        }

    }

    /*添加费用*/
    function addCost(e){
        feeAddTr('','','','','');
    }
    function  dependantsAddTr(xm,nl,xb,yszgx,ids){
        if(xm==null)xm='';
        if(nl==null)nl='';
        if(xb==null)xb='';
        if(yszgx==null)yszgx='';
        if(ids==null)ids='';

        var str="<tr >\n" +
            "       <td><label><input value='"+xm+"' onblur=\"updateDependants(this,'"+ids+"','dependantsInfo/saveOrUpdate','xm');\"/></label></td>\n" +
            "       <td><label><input value='"+nl+"'  onblur=\"updateDependants(this,'"+ids+"','dependantsInfo/saveOrUpdate','nl');\" onkeyup= \"if(! /^((1[0-3])|[1-9])?\\d$/.test(this.value)){alert('请输入正确的年龄');this.value=this.defaultValue;}\"/></label></td>\n" +
            "       <td>" +
            "           <label>" +
            "               <select onchange=\"updateDependants(this,'"+ids+"','dependantsInfo/saveOrUpdate','xb');\">" +
            "                   <option value='1'>男</option>" +
            "                   <option value='0'>女</option>" +
            "               </select>" +
            "           </label>" +
            "       </td>\n" +
            "       <td><label><input  value='"+yszgx+"'   onblur=\"updateDependants(this,'"+ids+"','dependantsInfo/saveOrUpdate','yszgx');\"/></label></td>\n" +
            "       <td>\n" +
            "           <span class=\"glyphicon glyphicon-remove-sign\" onclick=\"deletetr(this,'"+ids+"','dependantsInfo/delById','GET');\"></span><span style='display:none'>"+ids+"</span>" +
            "       </td>\n" +
            "   </tr>";

        $("#tr_addDependents").before(str);

    }
//    添加被抚养人
    function addDependents(){
        dependantsAddTr('','','','','');
    }
    //添加护理人员行信息
    function addCaregiverTr(xm,nl,xb,gzqk,yszgx,gongziqk,ids){
        if(xm==null)xm='';
        if(nl==null)nl='';
        if(xb==null)xb='';
        if(gzqk==null)gzqk='';
        if(yszgx==null)yszgx='';
        if(gongziqk==null)gongziqk='';
        if(ids==null)ids='';
        var str="<tr >\n" +
            "       <td><label><input value='"+xm+"' onblur=\"updateCaregiver(this,'"+ids+"','caregiversInfo/saveOrUpdate','xm');\"/></label></td>\n" +
            "       <td><label><input value='"+nl+"'  onblur=\"updateCaregiver(this,'"+ids+"','caregiversInfo/saveOrUpdate','nl');\" onkeyup= \"if(! /^((1[0-3])|[1-9])?\\d$/.test(this.value)){alert('请输入正确的年龄');this.value=this.defaultValue;}\"/></label></td>\n" +
            "       <td>" +
            "           <label>" +
            "               <select onchange=\"updateDependants(this,'"+ids+"','caregiversInfo/saveOrUpdate','xb');\">" +
            "                   <option value='1'>男</option>" +
            "                   <option value='0'>女</option>" +
            "               </select>" +
            "           </label>" +
            "       </td>\n" +
            "       <td><label><input  value='"+gzqk+"'   onblur=\"updateCaregiver(this,'"+ids+"','caregiversInfo/saveOrUpdate','gzqk');\"/></label></td>\n" +

            "       <td><label><input  value='"+yszgx+"'   onblur=\"updateCaregiver(this,'"+ids+"','caregiversInfo/saveOrUpdate','yszgx');\"/></label></td>\n" +
            "       <td><label><input  value='"+gongziqk+"'   onblur=\"updateCaregiver(this,'"+ids+"','caregiversInfo/saveOrUpdate','gongziqk');\"/></label></td>\n" +

            "       <td>\n" +
            "           <span class=\"glyphicon glyphicon-remove-sign\" onclick=\"deletetr(this,'"+ids+"','caregiversInfo/delById','GET');\"></span><span style='display:none'>"+ids+"</span>" +
            "       </td>\n" +
            "   </tr>";
        $("#tr_addCaregiver").before(str);

    }
//    护理人
    function addCaregiver() {
        addCaregiverTr('','','','','','','');
    }
    //更新护理人员
    function  updateCaregiver(val,ids,url,name){
        if(name!=''&&url!=''){
            var taskNo=$("#taskNo").val();
            var tdValue=$(val).val();
            console.log("旧值:"+val.defaultValue+"新值："+tdValue);
            if(tdValue==''||val.defaultValue==tdValue){//为空或者未改变值
                return;
            }
            var map={};
            map[name]=tdValue;
            map['renuwno']=taskNo;
            if(ids!=''){
                map['ids']=ids;
            }else{
                ids=$(val).parent().parent().parent().children().eq(6).children().eq(1).text();
                map['ids']=ids;
            }
            $.ajax({
                url:url,
                data:map,
                /* dataType:"json",*/
                type:"POST",
                async:false,
                success:function(data){
                    if(data!=null){
                        if(data.status==1){
                            val.defaultValue=map[name];
                            if(ids==''){
                                //var s=$(val).parent().parent().parent().children().eq(4).children().eq(1).text(data.data.ids);
                                var operationTd=$(val).parent().parent().parent().children().eq(6);
                                debugger;
                                operationTd.empty();
                                var td=" <span class='glyphicon glyphicon-remove-sign' onclick=\"deletetr(this,'"+data.data.ids+"','caregiversInfo/delById','GET');\"></span>" +
                                    "<span style='display: none;'>"+data.data.ids+"</span>";
                                operationTd.append(td);
                            }
                        }else{
                            BootstrapDialog.show({
                                title: '提示信息',
                                message: data.msg,
                                type: BootstrapDialog.TYPE_WARNING,
                                size: BootstrapDialog.SIZE_SMALL,
                                buttons: [{
                                    label: '确认',
                                    action: function (dialog) {
                                        dialog.close();
                                    }
                                }]
                            });
                        }
                    }



                },
                error:function () {
                    alert("cuowu");

                }

            })

        }

    }

    //计算合计值
    //id dom对象的 id
    // index 指定列
    function eachTable(id,indexs){
        var sum=0;
        $(id+" tbody tr").each(function(index){
            var obj=$(this).children().eq(0).children();
            var objName=obj.get(0).tagName.toLowerCase();
            if(objName!='button'){
                var objValue=$(this).children().eq(indexs).children().children().val();
                if(!isNaN(objValue)){
                    sum+=Number(objValue);
                }
            }else if(objName=='button'){
                //$(".calculateSum").val(sum.toFixed(2));
                return false;
            }
        });
        return sum.toFixed(2);

    }
   function  dd(){

   }


</script>
<body>
<div class="container-fluid">
    <div id="form">
        <form class="form-inline" role="form" id="humanInfoForm">
            <div>
                <!--基本信息开始-->
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-bordered table-condensed" id="leftRightAlignment">
                            <tbody>
                            <tr style="display: none;">
                                <td > <input value="" id="taskNo" name="renuwno"/></td>
                            </tr>
                                <tr>
                                    <td><label>姓名:</label></td>
                                    <td><label><input name="xm" value="" class="" id="xm"/></label></td>
                                    <td><label>性别:</label></td>
                                    <td><label><select name="xb" id="xb"><option value="0"> 男</option><option value="1"> 女</option></select></label></td>
                                    <td><label>年龄:</label></td>
                                    <td><label><input name="nl" value="" class="" id="nl"></label></td>
                                </tr>
                                <tr>
                                    <td><label>户籍性质:</label></td>
                                    <td><label><select name="hj" id="hj"><option value=""> ---请选择--</option><option value="0"> 城镇</option><option value="1"> 乡村</option></select></label></td>
                                    <td><label>交通状态:</label></td>
                                    <td><label><select name="jtzt" id="jtzt"><option value=""> ---请选择--</option><option value="1"> 良好</option></select></label></td>
                                    <td><label>诊疗方式:</label></td>
                                    <td><label><select name="zlfs" id="zlfs"><option value=""> ---请选择--</option><option value="1"> 自费</option></select></label></td>
                                </tr>
                                <tr>
                                    <td><label>就诊医院:</label></td>
                                    <td><label><input name="jzyy" value="" class="" id="jzyy"/></label></td>
                                    <td><label>入院时间:</label></td>
                                    <td><label><input name="rysj"  id="rysj" value="" class="" /></label></td>
                                    <td><label>科室床位:</label></td>
                                    <td><label><input name="kscw" id="kscw" value="" class=""></label></td>
                                </tr>
                                <tr>
                                    <td><label>证件号码:</label></td>
                                    <td><label><input name="zjhm" id="zjhm" value="" class=""/><button type="button" class="btn-info btn-mini margin5Left">历史赔付信息</button></label></td>
                                    <td><label>联系电话:</label></td>
                                    <td><label><input name="lxdh" id="lxdh" value="" class=""/></label></td>
                                    <td><label>职业类别:</label></td>
                                    <td><label><select name="zylx" id="zylx" ><option value=""> ---请选择--</option><option value="1"> 11</option></select></label></td>
                                </tr>
                                <tr>
                                    <td><label>家庭住址:</label></td>
                                    <td colspan="3"><label><input name="jtdz" id="jtdz" value="" class="width300"/></label></td>
                                    <td><label>工资收入情况:</label></td>
                                    <td><label><input name="gzsrqk" id="gzsrqk" value="" class=""/></label></td>
                                </tr>
                                <tr>
                                    <td><label>伤者工作单位:</label></td>
                                    <td colspan="3"><label><input name="szgzdw" id="szgzdw" value="" class="width300"/></label></td>
                                    <td><label>岗位职务:</label></td>
                                    <td><label><input name="gwzw" id="gwzw" value="" class=""/></label></td>
                                </tr>
                                <tr>
                                    <td><label>单位地址:</label></td>
                                    <td colspan="3"><label><input name="dwdz" id="dwdz" value="" class="width300"/></label></td>
                                    <td><label>单位电话:</label></td>
                                    <td><label><input name="dwdh" id="dwdh" value="" class=""/></label></td>
                                </tr>
                                <tr>
                                    <td><label>最高伤残系数:</label></td>
                                    <td><label><select name="zgscxs" id="zgscxs"><option value=""> ---请选择--</option><option value="0"> 城镇</option><option value="1"> 乡村</option></select></label></td>
                                    <td><label>伤残附加系数:</label></td>
                                    <td><label><select name="scfjxt" id="scfjxt"><option value=""> ---请选择--</option><option value="1"> </option></select></label></td>
                                    <td><label>诊疗方式:</label></td>
                                    <td><label><input name=" " value=""/></label></td>
                                </tr>
                                <tr>
                                    <td><label>伤残程度:</label></td>
                                    <td><label><select name="sccd" id="sccd"><option value=""> ---请选择--</option><option value="1"> 1级</option><option value="2"> 2级</option></select></label></td>
                                    <td><label>伤残鉴定机构名称:</label></td>
                                    <td><label><input name="scjdjgmc" id="scjdjgmc" value=""/></label></td>
                                    <td><label>伤残鉴定机构组织机构代码:</label></td>
                                    <td><label><input name="scjdjgzzjgdm" id="scjdjgzzjgdm" value=""/></label></td>
                                </tr>
                            <tr>
                                <td>
                                    <label>是否需要担保:</label>
                                </td>
                                <td>
                                    <label class="radio-inline">
                                        <input type="radio" name="sfxydb" id="yesGuarantee" value="1">是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="sfxydb" id="noGuarantee" value="0">否
                                    </label>
                                </td>
                                <td>
                                    <label>是否已担保:</label>
                                </td>
                                <td>
                                    <label class="radio-inline">
                                        <input type="radio" name="sfydb" id="yesAlreadyGuarantee" value="1">是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="sfydb" id="noAlreadyGuarantee" value="0">否
                                    </label>
                                </td>
                                <td>
                                    <label>伤残级别:</label>
                                </td>
                                <td>
                                    <label>
                                        <select name="scjb" id="scjb" onchange="dd();">
                                            <option value="">-请选择-</option>
                                            <option value="1">一级</option>
                                            <option value="2">二级</option>
                                        </select>
                                    </label>
                                </td>
                            </tr>
                                <tr>
                                    <td>
                                        <label>是否完成人伤调查:</label>
                                    </td>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="sfwcrsdc" id="yesFinishHumanInvestigation" value="1">是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="sfwcrsdc" id="noFinishHummanInvestigation" value="0">否
                                        </label>
                                    </td>
                                    <td>
                                        <label>是否完成住院调查:</label>
                                    </td>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="sfwczydc" id="yesFinishHospitalInvestigation" value="1">是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="sfwczydc" id="noFinishHospitalInvestigation" value="0">否
                                        </label>
                                    </td>
                                    <td>
                                        <label>勘察人员:</label>
                                    </td>
                                    <td>
                                        <label>
                                            <input name="ckry" id="ckry"/>
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td><label>定损险种名称:</label></td>
                                    <td><label><select name="dsxzmc" id="dsxzmc"><option value=""> ---请选择--</option><option value="1"> 1级</option><option value="2"> 2级</option></select></label></td>
                                    <td><label>医疗费总额:</label></td>
                                    <td><label><input name="ylfze" id="ylfze" value=""/></label></td>
                                    <td><label>伤残费总额:</label></td>
                                    <td><label><input name="scfze" id="scfze" value=""/></label></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                </div>
                <!--基本信息结束-->
                <!--新增费用开始-->
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-condensed table-bordered" id="feeInfoTable">
                            <thead>
                            <tr class="tableTheadcolor">
                                <th>费用类型</th>
                                <th>查勘金额</th>
                                <th>预估金额</th>
                                <th>计算说明</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr id="tr_addCost">
                                <td><button type="button" class="btn-mini btn-info" onclick="addCost(this);">添加费用</button></td>
                                <td><label> 小计:<input class="" name="" value="" id="calculateSunFee1"/></label></td>
                                <td><label> 小计:<input class="" name="" value="" id="calculateSunFee2"/></label></td>
                                <td colspan="2"></td>
                            </tr>
                            </tbody>

                        </table>
                    </div>
                </div>
                <!--新增费用结束-->
                <!--被抚养着开始-->
                <div class="row">
                    <div class="col-md-12">
                        <div class="modelTitle text-center">
                            被抚养者
                        </div>
                        <table class="table table-condensed table-bordered">
                            <thead>
                                <tr class="tableTheadcolor">
                                    <th>姓名</th>
                                    <th>年龄</th>
                                    <th>性别</th>
                                    <th>与伤者关系</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <tr id="tr_addDependents">
                                <td colspan="5">
                                    <button type="button" class="btn-info btn-mini" onclick="addDependents();"> 添加被扶养人</button>
                                </td>

                            </tr>

                            </tbody>

                        </table>

                    </div>
                </div>
                <!--被抚养着结束-->
                <!--护理人开始-->
                <div class="row">
                    <div class="col-md-12">
                        <div class="modelTitle text-center">
                            护理人
                        </div>
                        <table class="table table-condensed table-bordered">
                            <thead>
                                <tr class="tableTheadcolor">
                                    <th>姓名</th>
                                    <th>年龄</th>
                                    <th>性别</th>
                                    <th>工作情况</th>
                                    <th>与伤者关系</th>
                                    <th>工资状况(月)</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr id="tr_addCaregiver">
                                    <td colspan="7">
                                        <button type="button" class="btn-info btn-mini" onclick="addCaregiver();"> 添加护理人</button>
                                    </td>
                                </tr>
                            </tbody>

                        </table>

                    </div>
                </div>

                <!--护理人结束-->
                <!--主要诊断开始-->
                <div class="row">
                    <div class="col-md-2 col-xs-2 col-sm-2 text-right">
                        <label>主要诊断</br>(可输入500字)</label>
                    </div>
                    <div class="col-md-8 col-xs-8 col-sm-8 text-left">
                        <label><textarea rows="4" style="width: 700px;" name="zyzd" id="zyzd"></textarea></label>
                    </div>
                </div>
                <!--主要诊断结束-->
                <!--查勘理算说明开始-->
                <div class="row">
                    <div class="col-md-2 col-xs-2 col-sm-2 text-right">
                        <div>查勘理算说明</div>
                        <div><select >
                            <option value="">-请选择-</option>
                            <option value="">1</option>
                            <option value="">2</option>
                        </select></div>
                        <div><label>(可输入1000字)</label></div>
                    </div>
                    <div class="col-md-8 col-xs-8 col-sm-8 text-left">
                        <label><textarea name="cksm" id="cksm" rows="4" style="width: 700px;"></textarea></label>
                    </div>
                </div>
                <!--查勘理算说明结束-->
                <!--操作项开始-->
                <div class="row">
                    <div class="col-md-12 text-center">
                        <button type="button" class="btn-mini btn-info" id="save" onclick="saveOrUpdate(this);"> 保存</button>
                        <button type="button" class="btn-mini btn-info" id="imageData"> 影像资料</button>
                        <button type="button" class="btn-mini btn-info" id="close"> 关闭</button>
                        <button type="button" class="btn-mini btn-info" id="historyInfo"> 历史信息</button>
                    </div>
                </div>

                <!--操作项结束-->
                <!--底部空白区开始-->
                <div class="row margin15bottom">
                    <div class="col-md-8">
                        <div style="height: 30px;">

                        </div>

                    </div>

                </div>
                <!--底部空白结束-->

            </div>

        </form>

    </div>

</div>
</body>
</html>